﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using System.Data.OleDb;
using Maticsoft.DBUtility;
using System.Data;

namespace Habito.ContactUs
{
	public partial class ContactUs : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{

			string content = GetContent();
			ViewState["content"] = content;
		}
		private string GetContent()
		{

			StringBuilder strSql = new StringBuilder();
			strSql.Append("select ID,content from contactus ");
			strSql.Append(" where ID=@ID");
			OleDbParameter[] parameters = {
					new OleDbParameter("@ID", OleDbType.Integer,4)
			};
			parameters[0].Value = 1;

			Ajax.Model.ProductClass model = new Ajax.Model.ProductClass();
			DataSet ds = DbHelperOleDb.Query(strSql.ToString(), parameters);
			if (ds.Tables[0].Rows.Count > 0)
			{
				return ds.Tables[0].Rows[0]["Content"].ToString();
			}
			else
			{
				return "";
			}
		}
	}
}